package com.sname.car.common;

import org.apache.commons.lang3.StringUtils;

import java.util.Random;

/**
 * Created By  醉美柳舞之众星捧月
 * @author songx
 * @date 2018/9/25 10:33
 */
public class RandomNumberCoder {

    /** 生成 4 位随机数 **/
    public static String verCode() {
        Random random = new Random();
        String result = StringUtils.substring(String.valueOf(random.nextInt()), 2, 6);
        return result;
    }

    /** 生成 随机数  **/
    public static String randomNo() {
        Random random = new Random();
        String result = String.valueOf(Math.abs(random.nextInt() * -10));
        return result;
    }
}
